/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fatecpg.ads.es3.tp.factory;

import br.com.fatecpg.ads.es3.tp.persistence.Burdeos;
import br.com.fatecpg.ads.es3.tp.persistence.Contabil;
import br.com.fatecpg.ads.es3.tp.persistence.DarkGrey;
import br.com.fatecpg.ads.es3.tp.persistence.IThemas;

/**
 *
 * @author Homer
 */
public class Aparencia {

    public static final String tipoBurdeos = "Burdeos";
    public static final String tipoContabil = "Contabil";
    public static final String tipoDarkGrey = "DarkGrey";

    public static IThemas setTheme(String tipo) {
        try {
            if (tipo == tipoBurdeos) {
                return new Burdeos();
            } else if (tipo == tipoDarkGrey) {
                return new DarkGrey();
            } else if (tipo == tipoContabil) {
                return new Contabil();
            }
        } catch (Exception ex) {
            throw new IllegalArgumentException("Tema"
                    + "não implementado: " + ex);
        }
        return null;
    }
}
